#!/bin/bash

# Copyright (c) 2020 SpaceWorks developers

# set working directory to the location of this script
DIR="$( cd "$( dirname "$( readlink -f "${BASH_SOURCE[0]}" )" )" && pwd )"
cd $DIR

NAME=SPACE

# Chain parameters
ERAS=6
BLOCKTIME=30
SUPPLY=0
REWARD=3600000000,2700000000,1800000000,900000000,600000000,300000000
END=939393,3757572,12212109,325343422,638474735,951606048
ADDNODE1=165.227.35.158
ADDNODE2=167.172.39.135
ADDNODE3=165.22.64.156
ADDNODE4=188.166.221.247

KMD=${KOMODOD:-./komodod}
$KMD -ac_name=$NAME                              \
     -ac_supply=$SUPPLY                          \
     -ac_eras=$ERAS                              \
     -ac_reward=$REWARD                          \
     -ac_end=$END                                \
     -ac_blocktime=$BLOCKTIME                    \
     -ac_staked=50                               \
     -ac_cbmaturity=1                            \
     -ac_cc=939                                  \
     -ac_sapling=1                               \
     -addnode=$ADDNODE1                          \
     -addnode=$ADDNODE2                          \
     -addnode=$ADDNODE3                          \
     -addnode=$ADDNODE4 "$@"
